home *** CD-ROM | disk | FTP | other *** search
/ Compendium Deluxe 1 / LSD Compendium Deluxe 1.iso / a / programming / assembly / coppers.lha / CopperDemo2.s < prev    next >
Encoding:
Text File  |  1980-01-01  |  1.5 KB  |  39 lines

  1. move.l $0004,a6               ; exec-base in a6
  2. jsr    -132(a6)               ; switch to monotasking
  3.  
  4. move.l #coppersize,d0         ; size of copperlist in d0
  5. move.l #$2,d1                 ; place in chip-ram
  6. jsr    -198(a6)               ; reserve ram
  7. move.l d0,copperram           ; d0 in chipcopper
  8.  
  9. lea.l  copperlist,a0          ; start of copperlist in a0
  10. move.l d0,a1                  ; reserved ram in a1
  11. copperloop:
  12. move.l (a0),(a1)+             ; copy longword from a0 to a1
  13. cmpi.l #$fffffffe,(a0)+       ; check for last longword in copperlist
  14. bne    copperloop             ; non ? then jump to copperloop
  15.  
  16. lea.l  $dff000,a0             ; begin of custom-chips in a0
  17.  
  18. move.w #$03e0,$96(a0)         ; switch dma off
  19. move.l copperram,$80(a0)      ; begin of copperlist in cop1lch
  20. clr.w  $88(a0)                ; clear copjmp1
  21. move.w #$8380,$96(a0)         ; switch dma on
  22.  
  23. neloop:
  24. jmp neloop                    ; never ending loop
  25.  
  26. copperlist: dc.w $0100,$1200,$0102,$0000,$0104,$0000
  27.             dc.w $0108,$0000,$010a,$0000,$0038,$0092
  28.             dc.w $00d0,$0094,$008e,$2c81,$0090,$2cc1
  29.             dc.w $0180,$0f00,$0182,$0fff,$0184,$0000
  30.             dc.w $0186,$0000,$0188,$0000,$018a,$0000
  31.             dc.w $018c,$0000,$018e,$0000,$0190,$0000
  32.             dc.w $0192,$0000,$0194,$0000,$0196,$0000
  33.             dc.w $0198,$0000,$019a,$0000,$019c,$0000
  34.             dc.w $019e,$0000,$00e0,$0000,$00e2,$0000
  35.             dc.w $ffff,$fffe
  36. coppersize=*-copperlist
  37.  
  38. copperram:  dc.l 0
  39.